<?
$myUrl = 'http://api.yelp.com/business_review_search?term=J+Baldwin&location=Detroit%20MI&radius=1&ywsid=DV-8c6B4AhUhsjTnz5aFPg';
$curl = curl_init();
    curl_setopt ($curl, CURLOPT_URL, $myUrl);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);

    $result = curl_exec ($curl);
    curl_close ($curl);
   //print $result;
   $decodedResult = json_decode($result, true);
    
    var_dump(is_array($decodedResult));
    echo "<p>&nbsp;</p>";
    var_dump(count($decodedResult));
    echo "<p>&nbsp;</p>";
    var_dump(array_keys($decodedResult["businesses"]));
    echo "<p>&nbsp;</p>";
     echo "Length: " . var_dump(array_keys($decodedResult["businesses"][0]));
     echo "<p>&nbsp;</p>";
     echo var_dump($decodedResult["businesses"][0]["name"]);
     echo "<p>&nbsp;</p>";
     echo var_dump(array_keys($decodedResult["businesses"][0]["reviews"][0]));
     
    
    //var_dump($decodedResult["businesses"][0]);
   
   
		
		  /*
     echo "<P>";
     if(is_array($ar1)){
       while( $ar2 = each( $ar1 ) )
         if(is_array($ar2)){
            while( $ar3 = each( $ar2 ) ){
              "<p>" .  var_dump(array_keys($ar3)) . "<p>";
            }
         }
       }
       */
   

?>